﻿<UserControl x:Class="Axelerate3DEngineUseSamples.PrimitiveMeshBuilderTest"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:bqc="clr-namespace:Axelerate.Silverlight3D.Controls;assembly=Axelerate.Silverlight3D"
    xmlns:b3d="clr-namespace:Axelerate.Silverlight3D.Media.Media3D;assembly=Axelerate.Silverlight3D"
    >
    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <Storyboard x:Name="anim1" Completed="anim1_Completed">
                <!-- Duration="00:00:00.05" --><DoubleAnimation  Duration="00:00:10" From="0" To="360" Storyboard.TargetName="myAngleRotation" Storyboard.TargetProperty="Angle"  AutoReverse="False" />
            </Storyboard>
        </Grid.Resources>
        <bqc:Viewport3D x:Name="viewport" LightModel="None" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SeamSmoothing="0" UseLayoutRounding="False">
            <bqc:Viewport3D.Camera>
                <b3d:PerspectiveCamera  FarPlaneDistance="20" LookDirection="0,-2,-5" UpDirection="0,1,0" NearPlaneDistance="0" Position="-1,4,5" FieldOfView="45">
                    
                </b3d:PerspectiveCamera>
            </bqc:Viewport3D.Camera>
            <b3d:ModelVisual3D  x:Name="topModelVisual3D">
                <b3d:ModelVisual3D.Content>
                            <b3d:GeometryModel3D x:Name="mGeometry">
                        
                            <b3d:GeometryModel3D.Material>
                                    <b3d:DiffuseMaterial>
                                        <b3d:DiffuseMaterial.Brush>
                                            <SolidColorBrush Color="Blue" Opacity="1" />
                                        </b3d:DiffuseMaterial.Brush>
                                    </b3d:DiffuseMaterial>
                                </b3d:GeometryModel3D.Material>
                        <b3d:GeometryModel3D.BackMaterial>
                            <b3d:DiffuseMaterial>
                                <b3d:DiffuseMaterial.Brush>
                                    <SolidColorBrush Color="Red" Opacity="1" />
                                </b3d:DiffuseMaterial.Brush>
                            </b3d:DiffuseMaterial>
                        </b3d:GeometryModel3D.BackMaterial>


                    </b3d:GeometryModel3D>
                        </b3d:ModelVisual3D.Content>
                <b3d:ModelVisual3D.Transform>
                    <b3d:RotateTransform3D CenterX="0" CenterY="0" CenterZ="0">
                        <b3d:RotateTransform3D.Rotation>
                            <b3d:AxisAngleRotation3D x:Name="myAngleRotation" Axis="0,1,0" Angle="0"  />
                        </b3d:RotateTransform3D.Rotation>
                    </b3d:RotateTransform3D>
                </b3d:ModelVisual3D.Transform>
            </b3d:ModelVisual3D>
            <b3d:ModelVisual3D>
                <b3d:ModelVisual3D.Content>
                    <b3d:DirectionalLight Color="White" Direction="1,2,3" />
                </b3d:ModelVisual3D.Content>
            </b3d:ModelVisual3D>
        </bqc:Viewport3D>
    </Grid>
</UserControl>
